{% extends "blog/base.html" %}

{% block htmlTitle %}文章归档{% endblock %}

{% block head %}{% endblock %}

{% block pageTitle %}文章归档{% endblock %}
{% block pageSubTitle %}{% endblock %}

{% block content %}

<div class="mdui-card mdui-hoverable card mdui-typo">
  <div class="mdui-card-content">
    <ul class="mdui-list">
      {% for article in articles %}
        <li class="mdui-list-item">
          <span>{{ article.date }} / </span>
          <a href="{{ url_for('blog.article', article_id=article.id) }}"> {{ article.title }}</a>
        </li>
      {% endfor %}  
    </ul>
  </div>
</div>

<div class="card mdui-card mdui-text-center mdui-hoverable">
  <div class="mdui-card-content">
    {% if page > 1 %}
      <a href="{{ url_for('blog.archive', page=page - 1) }}" class="mdui-btn mdui-ripple"><i class="mdui-icon material-icons">navigate_before</i>上一页</a>
    {% endif %}
      <button class="mdui-btn mdui-color-theme-accent mdui-ripple">{{ page }}/{{ tot_page }}</button>
    {% if tot_page > page %}
      <a href="{{ url_for('blog.archive', page=page + 1) }}" class="mdui-btn mdui-ripple">下一页<i class="mdui-icon material-icons">navigate_next</i></a>
    {% endif %}
  </div>
</div>

{% endblock %}